const Router = require("koa-router");

const { verifyAuth } = require("../middleware/auth.middleware");

const {
  create,
  list,
  detail,
  update,
  remove,
  changeStatus,
  changeTypes,
} = require("../controller/apply.controller.js");

const applyRouter = new Router({ prefix: "/apply" });

applyRouter.post("/", verifyAuth, create);
applyRouter.get("/", list);
applyRouter.get("/:applyId", detail);
applyRouter.patch("/", verifyAuth, update);
applyRouter.delete("/:applyId", verifyAuth, remove);
applyRouter.post("/changeStatus", verifyAuth, changeStatus);
applyRouter.post("/changeTypes", verifyAuth, changeTypes);

module.exports = applyRouter;
